export const Store = {
    //设置存储的基本信息；
    get(key,isJson=true){
        let data = localStorage.getItem(key);

        if(isJson && data !=null){
            data = JSON.parse(data);
        }

        return data;
    },

    set(key,val,isJson=true){
        if(!key || !val){
            return false;
        }

        if(isJson){
            localStorage.setItem(key,JSON.stringify(val));
        }else{
            localStorage.setItem(key,val);
        }
    },
    delete(key){
        localStorage.removeItem(key);
    }
}